package DataStructures.Project3.Group3.s12cs342;

import encryption.StrEnToBI;
import encryption.StrFromBI;


public class ScoreContainer {
	private String test;
	private String desc;
	private String outScore;
	private int testID;
	
	/**
	 * Constructor to decode the score and send to the UI
	 * 
	 * @param test - test name
	 * @param desc - description of the test
	 * @param inScore - encrypted Score
	 */
	public ScoreContainer (String test, String desc, String inScore, String pass){
		this.test = test;
		this.desc = desc;
		
		this.outScore = StrFromBI.decrypt(inScore, pass);
		
	}
	
	/**
	 * Constructor to make the score with the test ID and the score
	 * to send to the Cloud
	 * 
	 * @param testID - the test the score belongs too
	 * @param inScore - the score to be encrypted
	 */
	public ScoreContainer(int testID, String inScore, String pass){
		this.testID = testID;
		

		outScore = StrEnToBI.EncryptBI(inScore, pass);
	}
	
	
	@Override
	public String toString() {
		return "Title:  " + test + "   Description:  " + desc
				+ "   score:  " + outScore +"%";
	}

	public String getTest() {
		return test;
	}

	public void setTest(String test) {
		this.test = test;
	}

	public String getDesc() {
		return desc;
	}

	public void setDesc(String desc) {
		this.desc = desc;
	}

	public String getOutScore() {
		return outScore;
	}

	public void setOutScore(String outScore) {
		this.outScore = outScore;
	}

	public int getTestID() {
		return testID;
	}

	public void setTestID(int testID) {
		this.testID = testID;
	}
	
}
